package com.qmx.launcher.activity;

import android.os.Bundle;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.AnticipateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.RotateAnimation;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.qmx.launcher.R;
import com.qmx.launcher.activity.base.BaseActivity;

import de.hdodenhof.circleimageview.CircleImageView;

public class CallContactActivity extends BaseActivity {
    private CircleImageView profile_image;
    private ImageView iv_call_effects;
    private TextView tv_contact_name, tv_contact_number;
    private Button bt_hang_up;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_call_contact);
        initView();

    }

    public void initView() {
        iv_call_effects = (ImageView) findViewById(R.id.iv_call_effects);
        RotateAnimation rotateAnimation = new RotateAnimation(0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
        rotateAnimation.setRepeatMode(Animation.REVERSE);
        rotateAnimation.setInterpolator(new AnticipateInterpolator());
        rotateAnimation.setRepeatCount(-1);
        rotateAnimation.setDuration(1000);
        iv_call_effects.setAnimation(rotateAnimation);
        profile_image = (CircleImageView) findViewById(R.id.iv_icon_header);
        tv_contact_name = (TextView) findViewById(R.id.tv_contact_name);
        tv_contact_number = (TextView) findViewById(R.id.tv_contact_number);
        bt_hang_up = (Button) findViewById(R.id.btn_hangup);

        bt_hang_up.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showToast("挂断");
                finish();
            }
        });

    }

}
